//package cn.good.yan.exp;
//
//import cn.good.yan.resp.ResultData;
//import cn.good.yan.resp.ReturnCodeEnum;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.http.HttpStatus;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.ResponseStatus;
//import org.springframework.web.bind.annotation.RestControllerAdvice;
//
///**
// * 全局异常
// *
// * @author shengren.yan
// * @create 2022-12-04
// */
//@Slf4j
//@RestControllerAdvice
//public class GlobalExceptionHandler {
//    @ExceptionHandler(RuntimeException.class)
//    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
//    public ResultData<String> exception(Exception e) {
//        System.out.println("#####come in GlobalExceptionHandler");
//        e.printStackTrace();
////        log.error("全局异常信息:{}", e.getMessage(), e);
//        // 失败有异常，返回500
//        return ResultData.fail("500", e.getMessage());
//    }
//}
